package com.a85.wxhelper.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author hejiangwei
 * Created at 2018/7/3.
 * 传递给悬浮球的数据信息类
 */
public class MessageBean {
    boolean isSend;
    int msgType;
    String userId;
    String nickName;
    String content;
    long msgId;

    public MessageBean(Builder builder) {
        this.isSend = builder.isSend;
        this.msgType = builder.msgType;
        this.userId = builder.userId;
        this.nickName = builder.nickName;
        this.content = builder.content;
        this.msgId = builder.msgId;
    }

    public boolean isSend() {
        return isSend;
    }

    public void setSend(boolean send) {
        isSend = send;
    }

    public int getMsgType() {
        return msgType;
    }

    public void setMsgType(int msgType) {
        this.msgType = msgType;
    }

    public String getUserId() {
        return userId == null ? "" : userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName == null ? "" : nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getContent() {
        return content == null ? "" : content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getMsgId() {
        return msgId;
    }

    public void setMsgId(long msgId) {
        this.msgId = msgId;
    }

    public static class Builder {
        boolean isSend;
        int msgType;
        String userId;
        String nickName;
        String content;
        long msgId;



        public Builder isSend(boolean isSend) {
            this.isSend = isSend;
            return this;
        }

        public Builder msgType(int msgType) {
            this.msgType = msgType;
            return this;
        }

        public Builder userId(String userId) {
            this.userId = userId;
            return this;
        }

        public Builder nickName(String nickName) {
            this.nickName = nickName;
            return this;
        }

        public Builder content(String content) {
            this.content = content;
            return this;
        }
 public Builder msgId(long msgId) {
            this.msgId = msgId;
            return this;
        }

        public MessageBean build() {
            return new MessageBean(this);
        }
    }

}
